import axios from '@/utils/request.js'
export const getContent = (params) => {
  return axios({
    url: '/post',
    params
  })
}
export const getPost = (id) => {
  return axios({
    url: '/post/' + id
  })
}
// 点赞
export const postLike = (id) => {
  return axios({
    url: '/post_like/' + id
  })
}
// 收藏
export const postStar = (id) => {
  return axios({
    url: '/post_star/' + id
  })
}

// 评论列表
export const getComment = (id) => {
  return axios({
    url: '/post_comment/' + id
  })
}

// 发表文章
export const postComment = (id, data) => {
  return axios({
    method: 'post',
    url: '/post_comment/' + id,
    data
  })
}